import { z } from 'zod';

export const UserChapterSchema = z.object({
    courseId: z.string().min(1, { message: '课程ID不能为空' }),
    chapterId: z.string().min(1, { message: '章节ID不能为空' }),
    // 将字符串校验改为数字校验
    studyCount: z.number(),
    studyTime: z.number(),
    wrongCount: z.number(),
});


// 实际的DTO类，用于NestJS依赖注入系统
export class UserChapterDto {
    courseId: string;
    chapterId: string;
    studyCount: number;
    studyTime: number;
    wrongCount: number;
}